package android.explorer;

public class FileExtendsionManager {
	public static int fileIcon;
	public static String fileType;
	public static void filter(String ext){
		String extendsion=ext.toLowerCase();
		if(extendsion.endsWith("folder")){
			fileType="File folder";
			fileIcon=  R.drawable.folder32;
			return;
		}
		if(extendsion.endsWith("zip")){
			fileType="Data compression and archive format";
			fileIcon=  R.drawable.filearchive24;
			return;
		}
		if(extendsion.endsWith("mp3")){
			fileType="File audio";
			fileIcon=  R.drawable.fileaudio24;
			return;
		}
		if(extendsion.endsWith("jpg") || extendsion.endsWith("gif") || 
				extendsion.endsWith("bmp") || extendsion.endsWith("png")){
			fileType="File picture";
			fileIcon=  R.drawable.filepicture24;
			return;
		}
		if(extendsion.endsWith("sdcard")){
			fileType="Secure Digital Memory Card";
			fileIcon=  R.drawable.sdcard32;
			return;
		}
		if(extendsion.endsWith("root")){
			fileType="Root file";
			fileIcon=  R.drawable.tree32;
			return;
		}
		if(extendsion.endsWith("audio")){
			fileType="File audio";
			fileIcon=  R.drawable.audio32;
			return;
		}
		if(extendsion.endsWith("ogg")){
			fileType="File audio";
			fileIcon=  R.drawable.audio32;
			return;
		}
		if(extendsion.endsWith("cache")){
			fileType="File cache";
			fileIcon=  R.drawable.cache32;
			return;
		}
		if(extendsion.endsWith("data")){
			fileType="File data";
			fileIcon=  R.drawable.data32;
			return;
		}
		if(extendsion.endsWith("image")){
			fileType="File image";
			fileIcon=  R.drawable.picture32;
			return;
		}
		if(extendsion.endsWith("system"))fileIcon=  R.drawable.system32;
		if(extendsion.endsWith("video"))fileIcon=  R.drawable.video32;
		if(extendsion.endsWith("empty"))fileIcon=  R.drawable.empty32;
		fileType="Unknow file";
		fileIcon=R.drawable.fileunknown24;
	}
}
